; Add cross-references to push and pop docstrings
authorStefan Kangas <stefankangas@gmail.com>
Wed, 19 Mar 2025 20:27:38 +0000 (21:27 +0100)
committerStefan Kangas <stefankangas@gmail.com>
Wed, 19 Mar 2025 20:29:16 +0000 (21:29 +0100)
* lisp/subr.el (push, pop): Add cross-references to Info manual.

lisp/subr.el

index 87a06575de7bf8c85ec8e747fdc39a0a8a94a9c3..99981848db4735f6ac4a63256f6dae1c61dd947c 100644 (file)
@@ -245,8 +245,12 @@ STATES should be an object returned by `buffer-local-set-state'."
 
 (defmacro push (newelt place)
   "Add NEWELT to the list stored in the generalized variable PLACE.
+
 This is morally equivalent to (setf PLACE (cons NEWELT PLACE)),
-except that PLACE is evaluated only once (after NEWELT)."
+except that PLACE is evaluated only once (after NEWELT).
+
+For more information about generalized variables, see Info node
+`(elisp) Generalized Variables'."
   (declare (debug (form gv-place)))
   (if (symbolp place)
       ;; Important special case, to avoid triggering GV too early in
@@ -260,9 +264,13 @@ except that PLACE is evaluated only once (after NEWELT)."
 
 (defmacro pop (place)
   "Return the first element of PLACE's value, and remove it from the list.
+
 PLACE must be a generalized variable whose value is a list.
 If the value is nil, `pop' returns nil but does not actually
-change the list."
+change the list.
+
+For more information about generalized variables, see Info node
+`(elisp) Generalized Variables'."
   (declare (debug (gv-place)))
   ;; We use `car-safe' here instead of `car' because the behavior is the same
   ;; (if it's not a cons cell, the `cdr' would have signaled an error already),